package com.lanhu.designpattern.singleton.register;

/**
 * author:zhangzg
 * date:2020/11/1 2:13
 * 枚举类单例从jdk层面屏蔽了反射和序列化破坏
 */
public enum  SingletonEnums {
    /**
     *
     */
    INSTANTS;

    private Object data;

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public static SingletonEnums getInstants(){
        return INSTANTS;
    }
}
